<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>浮动练习</title>

    <style>
        * {
            margin: 0;
            padding: 0;
        }

        .box {
            background-color: #999;
            width: 1250px;
            height: 220px;
            margin: 100px auto;
        }

        .box ul {
            list-style: none;
        }

        .box li {
            float: left;
            margin-top: 10px;
            margin-left: 10px;
        }

        .bgdiv {
            background-color: white;
            width: 300px;
            height: 200px;
        }

        .imgdiv {
            background-color: pink;
            width: 300px;
            height: 130px;
        }

        .box h3 {
            font-size: 16px;
            font-weight: 400;
            text-align: center;
            margin-top: 10px;
        }

        .box h4 {
            font-weight: 400;
            font-size: 14px;
            margin-top: 5px;
            text-align: center;
        }
    </style>

</head>
<body>
    
    <div class="box">
        <ul>
            <li>
                <div class="bgdiv">
                    <div class="imgdiv"></div>
                    <h3>这是标题</h3>
                    <h4>这是内容</h4>
                </div>
            </li>
            <li>
                <div class="bgdiv">
                    <div class="imgdiv"></div>
                    <h3>这是标题</h3>
                    <h4>这是内容</h4>
                </div>
            </li>
            <li>
                <div class="bgdiv">
                    <div class="imgdiv"></div>
                    <h3>这是标题</h3>
                    <h4>这是内容</h4>
                </div>
            </li>
            <li>
                <div class="bgdiv">
                    <div class="imgdiv"></div>
                    <h3>这是标题</h3>
                    <h4>这是内容</h4>
                </div>
            </li>
        </ul>
    </div>

</body>
</html>